<template>
    <div class="container">
        <div class="bannerbox">
            <div class="left">
                <div class="titlebord" v-for="(ele, index) in bannercontent.bannertitlelist" :key="index">{{ ele }}</div>
                <div class="msg">{{ bannercontent.msg }}</div>
                <div v-if="bannercontent.button.isbtn" :class="bannercontent.button.class" @click="opentcc">{{
                    bannercontent.button.name }}
                </div>
                <div v-if="!bannercontent.button.isbtn" class="nobunimg">
                    <img src="../assets/img/routine.png" alt="">
                </div>
                <!-- <div class="bluebtn">免费试用</div> -->
            </div>
            <div class="right">
                <img :src="bannercontent.banner" alt="">
            </div>
        </div>
        <el-dialog title="" :visible.sync="dialogVisible" width="30%" :before-close="handleClose"
            style="text-align: center">
            <h3 style="text-align: center">请扫码添加联系客服，体验本产品</h3>
            <img style="width: 340px; height: 300px" src="../assets/img/print.png" alt="" />
        </el-dialog>
    </div>
</template>
<script>
export default {
    props: {
        bannercontent: {
            type: Object,
            require: true,
        }
    },
    data() {
        return {
            dialogVisible: false,
        }
    },
    methods: {
        opentcc() {
            this.dialogVisible = true;
        },
        handleClose() {
            this.dialogVisible = false;
        },
    }
}
</script>
<style lang="scss" scoped>
.bannerbox {
    width: 100%;
    box-sizing: border-box;
    display: flex;

    .left {
        padding-top: 80px;

        .titlebord {
            color: #202536;
            font-weight: 700;
            font-size: 50px;
        }

        .msg {
            margin-top: 30px;
            font-size: 16px;
            line-height: 30px;
            color: #565868;
            width: 555px;
        }

        .bluebtn {
            margin-top: 50px;
            width: 250px;
            height: 60px;
            border-radius: 10px;
            color: #ffffff;
            display: flex;
            font-size: 16px;
            align-items: center;
            justify-content: center;
            background-color: #3E5FF5;
            box-shadow: 0px 14px 20px 0px rgba(62, 95, 245, 0.33);
        }

        .greenbtn {
            margin-top: 50px;
            width: 250px;
            height: 60px;
            border-radius: 10px;
            color: #ffffff;
            display: flex;
            font-size: 16px;
            align-items: center;
            justify-content: center;
            background-color: #00D679;
            box-shadow: 0px 14px 20px 0px rgba(0, 214, 121, 0.33);
        }
    }

    .right {
        width: 596px;

        img {
            width: 100%;
            height: auto;
        }
    }
}

.nobunimg {
    margin-top: 66px;
    width: 169px;
    height: auto;

    img {
        width: 100%;
        height: auto;
    }
}
</style>